import request from '../util/request'
import user from './modules/user.js'
import zan from './modules/zan.js'
import article from './modules/article.js'
import collection from './modules/collection.js'
const mock = true;

export default {
	...user,
	...article,
    ...zan,
    ...collection,
    getArticleCategories() {
        return request({
            url: 'article-categories'
        })
    },

    getArticles() {
        return request({
            url: 'articles'
        })
    },

    getArticlesByCategory(id) {
        return request({
            url: 'articles?article_category=' + id
        })
    },

    getArticleById(id) {
        return request({
            url: 'articles/' + id
        })
    }


}
